<c:if test="true"
  xmlns="http://www.w3.org/1999/xhtml"
  xmlns:c="http://java.sun.com/jstl/core"
  xmlns:f="http://java.sun.com/jsf/core"
  xmlns:nxu="http://nuxeo.org/nxweb/util"
  xmlns:nxd="http://nuxeo.org/nxweb/document"
  xmlns:nxh="http://nuxeo.org/nxweb/html"
  xmlns:nxl="http://nuxeo.org/nxforms/layout"
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:nxp="http://nuxeo.org/nxweb/pdf">
<c:if test="#{nxl:isLikePlainMode(widget.mode)}">#{field_2}</c:if>
<c:if test="#{nxl:isLikeViewMode(widget.mode)}">

  <div class="popupTarget" docRef="#{field_0}">

    <nxd:restDocumentLink documentId="#{field_0}" repositoryName="#{field_1}"
      tab="#{widgetProperty_tab}" subTab="#{widgetProperty_subTab}"
      tabs="#{widgetProperty_tabs}"
      target="#{widgetProperty_target}"
      view="#{nxu:test(empty tabWidgetView, widgetProperty_view, tabWidgetView)}"
      pattern="#{nxu:test(empty tabWidgetPattern, widgetProperty_pattern, tabWidgetPattern)}">
      <span id="title_#{field_0}" title="#{label}" class="documentTitle">
       <c:if test="#{widgetProperty_localize}">
        #{messages[field_2]}
       </c:if>
       <c:if test="#{!widgetProperty_localize}">
         #{field_2}
       </c:if>
      </span>
    </nxd:restDocumentLink>

    <c:if test="#{!widgetProperty_hideExternalLink}">
      <nxd:restDocumentLink documentId="#{field_0}" repositoryName="#{field_1}"
        newConversation="true" target="_blank"
        tab="#{widgetProperty_tab}"
        subTab="#{widgetProperty_subTab}"
        tabs="#{widgetProperty_tabs}"
        view="#{nxu:test(empty tabWidgetView, widgetProperty_view, tabWidgetView)}"
        pattern="#{nxu:test(empty tabWidgetPattern, widgetProperty_pattern, tabWidgetPattern)}">
        <nxu:graphicImage value="/icons/external.gif"
          style="vertical-align:middle"
          alt="#{messages['permalink.newTab']}"
          title="#{messages['permalink.newTab']}" />
      </nxd:restDocumentLink>
    </c:if>

  </div>

</c:if>
<c:if test="#{widget.mode == 'pdf'}">
  <nxp:html>
    <c:if test="#{widgetProperty_localize}">
      #{messages[field_2]}
    </c:if>
    <c:if test="#{!widgetProperty_localize}">
     #{field_2}
    </c:if>
  </nxp:html>
</c:if>

</c:if>